home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 05 - 1989 / 05.03 Mar 89 / Basic⁄Pascal Source Code / ADB Pascal Sample / MyADBGlobals < prev    next >
Encoding:
Text File  |  1989-02-07  |  1.9 KB  |  117 lines  |  [TEXT/PJMM]

  1. unit MyADBGlobals;
  2.  
  3. interface
  4.  
  5.     uses
  6.         OSIntf, PrintTraps;
  7.  
  8.     const
  9.  
  10.     {window constants}
  11.         ZoomBox = 8;    {window type}
  12.         MinWidth = 80;
  13.         MinHeight = 80;
  14.         mBarHeightGlobal = $BAA;
  15.         GrayRgnLowMemGlobal = $9EE;
  16.         sBarWidth = 16;
  17.         TEMax = 32767;
  18.  
  19.         rsrc = 'ADBx';    {creator bytes restype}
  20.  
  21.     {dialog stuff}
  22.         AboutDialog = 256;
  23.         MessageDialog = 258;
  24.         AlertDialog = 260;
  25.  
  26.     { menu res id's}
  27.         AppleMenu = 256;
  28.         FileMenu = 257;
  29.         EditMenu = 258;
  30.  
  31.         MenuCount = 3;
  32.         AppleM = 1;
  33.         FileM = 2;
  34.         EditM = 3;
  35.  
  36. {menu items}
  37.         aAbout = 1;
  38.  
  39.         fADB = 1;
  40.         fSave = 3;
  41.         fSaveAs = 4;
  42.         fPageSet = 5;
  43.         fPrint = 6;
  44.         fQuit = 8;
  45.  
  46.         eUndo = 1;
  47.         eCut = 3;
  48.         eCopy = 4;
  49.         ePaste = 5;
  50.         eClear = 6;
  51.  
  52.         versRequested = 1;
  53.         numlock = 1;
  54.         capslock = 2;
  55.         scrolllock = 4;
  56.  
  57.         envBadVers = -5501;
  58.         envVersTooBig = -5502;
  59.     type
  60.  
  61.         LongAndByte = record
  62.                 case integer of
  63.                     1: (
  64.                             longView: LongInt
  65.                     );
  66.                     2: (
  67.                             byteView: record
  68.                                     byte0: SignedByte;
  69.                                     byte1: Signedbyte;
  70.                                     byte2: Signedbyte;
  71.                                     byte3: Signedbyte;
  72.                                 end;
  73.                     );
  74.             end;
  75.  
  76.     var
  77.  
  78. {my misc stuff}
  79.         Finished: boolean;
  80.         mBarHeight: Integer;
  81.  
  82.     {menu stuff}
  83.         myMenus: array[1..MenuCount] of MenuHandle;
  84.  
  85.     {rectangles}
  86.         DragArea: Rect;     {window drag area}
  87.         GrowArea: Rect;    {window grow area}
  88.         Screen: Rect;        {physical screen area}
  89.         ADBWindowRect: Rect;    {beginning window size}
  90.         ZoomRect: Rect;    {zoomed window size}
  91.         HCRect, VCRect, GrowRect: Rect; {scroller rects}
  92.         DestRect, ViewRect: Rect;    {text edit rects}
  93.  
  94. {dialogs stuff}
  95.         ItemHit: integer;
  96.         dialogflg: boolean;
  97.  
  98. {Window Stuff}
  99.         ADBWindow: WindowPtr;
  100.         ADBWindowPeek: WindowPeek;
  101.         myTextHandle: TEHandle;
  102.         VControl: ControlHandle;
  103.         HControl: ControlHandle;
  104.         myPrint: THPrint;
  105.  
  106. {ADB Stuff}
  107.         theWorld: SysEnvRec;
  108.         OSEr: OSErr;
  109.         numberofADBs: integer;
  110.         info: ADBDataBlock;
  111.         buf: ADBOpBlock;
  112.         ADBAddr: ADBAddress;
  113.         device: byte;
  114.  
  115. implementation
  116.  
  117. end.